<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Wizard.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<PackageDescriptor>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <h1 style="height: 90px; margin: 10px" class="ui-widget-content ui-border-bottom">
        <img style="float: left;" src="<%:Url.Content("~/Content/Images/host/themes.png") %>"
            alt="" /><span style="float: left; padding-top: 20px; padding-left: 5px;">Themes</span>
    </h1>
    <div style="clear: left;" />
    <h2>
        Installed Themes</h2>
    <% using (Html.BeginForm("Themes", "Installation", FormMethod.Post, new { enctype = "multipart/form-data" }))
       { 
    %>
    <%:Html.AntiForgeryToken() %>
    <div style="margin-bottom: 10px;">
        <span>Select the theme pakcage (*.zip)</span>
        <input name="ThemePackage" style="margin-right: 5px;" type="file" /><%:Ajax.Submit("Upload") %>
    </div>
    <% if (ViewData["Error"] != null)
       { %>
    <div style="padding: 0pt 0.7em; margin-bottom: 10px;" class="ui-state-error ui-corner-all">
        <p>
            <span style="float: left; margin-right: 0.3em;" class="ui-icon ui-icon-alert"></span>
            <strong>Error:</strong>
            <%:ViewData["Error"] %></p>
    </div>
    <%} %>
    <%} %>
    <div style="overflow: auto;">
        <% foreach (var p in Model)
           { %>
        <div style="float: left;">
            <table>
                <tr>
                    <td style="width: 200px; height: 200px;" valign="top" align="center">
                        <img src="<%:p.ImageUrl %>" alt="" />
                    </td>
                    <td valign="top">
                        <% Html.RenderPartial("PackageDetail", p); %>
                    </td>
                </tr>
            </table>
        </div>
        <%} %>
    </div>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="head" runat="server">
</asp:Content>
